﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using Thor.Common;

namespace Thor.Domain
{
    /// <summary>
    /// Represents an appointment on a calendar.
    /// </summary>
    public class Appointment
    {
        /// <summary>
        /// The unique id of the appointment.
        /// </summary>
        [Key]
        public Guid Id { get; set; }

        /// <summary>
        /// The appointment's start time.
        /// </summary>
        public DateTime StartTime { get; set; }

        /// <summary>
        /// The appointment's end time.
        /// </summary>
        public DateTime EndTime { get; set; }

        /// <summary>
        /// The subject of the appointment.
        /// </summary>
        public string Subject { get; set; }

        public override string ToString()
        {
            return string.Format("{0} | {1} | {2}", Subject, StartTime.ToString(), EndTime.ToString());
        }
    }
}
